package org.csmzxy.class2333;

public class ArrayMaxValue {
        public static void main(String[] args){
            int[] arr = {52, 63, 1, 14, 36, 95, 6, 10, 27, 40};
            int maxValue = arr[0];
            int maxIndex = 0;
            for (int i = 0; i <arr.length; i++){
                if (arr[i] > maxValue){
                    maxValue = arr[i];
                    maxIndex = i;
                }
        }System.out.println("数组中的最大值是" + maxValue + "位于数组的第" +(maxIndex + 1)+"个位置");
    }
}
